<script setup lang="ts">
const { login, register } = useDailog();
const handleBack = () => {
  login.value = false;
  register.value = false;
  return navigateTo("/");
};
</script>

<template>
  <div class="fixed inset-0 bg-[url('/bg.jpg')] z-50">
    <div
      class="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-white p-6 rounded-lg border shadow-md lg:p-12"
    >
      <button
        type="button"
        class="cursor-pointer absolute top-6 right-12 flex justify-end items-center text-gray-500 text-sm gap-x-1"
        @click.stop="handleBack"
      >
        <Icon name="uil:corner-down-right-alt" class="rotate-180" />
        <div>返回</div>
      </button>
      <slot></slot>
    </div>
  </div>
</template>
